{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# GUI"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "由于 “欢迎消息” 每次编译都会弹出提示框，很麻烦，所以这里给注释掉了。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'ok'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Python GUI\n",
    "from tkinter import *\n",
    "import tkinter.simpledialog as dl\n",
    "import tkinter.messagebox as mb\n",
    "\n",
    "#tkinter GUI Input Output Example\n",
    "#设置GUI\n",
    "root = Tk()\n",
    "w = Label(root, text = \"Label Title\")\n",
    "w.pack()\n",
    "\n",
    "#欢迎消息\n",
    "# mb.showinfo(\"Welcome\", \"Welcome Message\")\n",
    "# guess = dl.askinteger(\"Number\", \"Enter a number\")\n",
    "# output = 'This is output message'\n",
    "# mb.showinfo(\"Output: \", output)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
